The present invention relates to a coded data transform method, a transcoding method, and a transcoding system and, more particularly, to those for transforming coded data which has been obtained by subjecting a video signal to a coding process and stored in a data base or the like, into coded data which can be decoded by a receiver, according to a transcoding process using a coding method and coding parameters different from those of the coding process. The invention also relates to a data storage medium containing a program for executing the transcoding process by using software.
In recent years, we have greeted the age of multimedia in which audio, video, and other data are integrally handled, and the conventional information media, i.e., means for transmitting information to people, such as newspapers, magazines, televisions, radios, and telephones, have been adopted as the targets of multimedia. Generally, xe2x80x9cmultimediaxe2x80x9d means media in which, not only characters, but also diagrams, speeches, and especially images are simultaneously expressed in relation with each other. In order to handle the conventional information media as the targets of multimedia, it is necessary to express the information as data in digital formats (digital data).
When the quantity of data possessed by each of the above-described information media is estimated as the quantity of digital data, in the case of characters, the data quantity per character is only 1xcx9c2 byte. However, in the case of speech, the data quantity is 64 kbits per second (quality for telecommunication). Further, in the case of moving picture, the required data quantity is more than 100 Mbits per second (quality for current television broadcasting). In other words, it is not practical to handle the digital data such as video data having an enormous quantity, as it is, in the corresponding information media. For example, although visual telephones have already been put to practical use by ISDN (Integrated Services Digital Network) having a transmission rate of 64 kbpsxcx9c1.5 Mbps, it is impossible to transmit digital video data corresponding to video output from a television camera as it is by ISDN.
As a result, data compression techniques are demanded. For example, for visual telephones, the video compression techniques based on the H.261 and H.263 standards which have been standardized by ITU-T (International Telecommunication Unionxe2x80x94Telecommunication Sector) are employed. Further, according to the data compression technique based on the MPEG1 standard, it is possible to record video data as well as audio data in an ordinary music CD (compact disk).
MPEG (Moving Picture Experts Group) is an international standard relating to a compression technique for video data (image signal of moving picture), and MPEG1 is the standard for compressing video data to 1.5 Mbps, i.e., data of a television signal to about 1/100. Since the transmission rate of targets to which the MPEG1 standard is directed is limited to about 1.5 Mbps, in MPEG2 which has been standardized to meet the demand for higher image quality, video data is compressed to 2xcx9c15 Mbps.
MPEG2 is the most representative international standard relating to a digital image coding method, and MPEG2 is now rapidly spreading in the technical fields relating to digital TV broadcasting and digital video disks.
Furthermore, under the existing circumstances, standardization of a video data compression technique, which enables coding and signal processing in object units and realizes new fuctions required in the age of multimedia, is now proceeded as MPEG4 by the working group which has carried out standardization of MPEG1 and MPEG2 (ISO/IEC JTC1/SC29/WG11). MPEG4 was originally aimed at standardization of a coding method of low bit rate, but the target of standardization of MPEG4 is now extended to a more versatile coding method of higher bit rate which is adaptable to an interlace image.
Meanwhile, MPEG2 is a standard adapted to a versatile coding method, and it can be employed under different conditions according to various uses. The condition to employ MPEG2 depends on factors relating to the image quality, such as the number of pixels on a display, the bit rate of a coded image signal (bit stream), etc.
However, in each image processing equipment, since the performance of hardware is restricted by cost, a bit stream which stream which has been coded under predetermined conditions.
For example, a decoder of an ordinary definition television cannot decode a bit stream of a HDTV (High Definition Television) which is adapted to an image of high pixel rate.
On the other hand, supposing a recorder capable of recording a bit stream which has been obtained by coding an image signal with a bit rate of 6 Mbps, for a length equivalent to two hours of video, this recorder can achieve longer-hour recording of the bit stream for a length equivalent to four hours of video by compressing the input bit stream having the bit rate of 6 Mbps so that the bit stream becomes 3 Mbps.
Hence, there is a demand for a transcoding technique for transforming an MPEG2 bit stream inputted to each image processing equipment into an MPEG2 bit stream adapted to the performance of hardware or the use in the image processing equipment. In recent years, many reports of research performed on such transcoding techniques have been presented (e.g., Gertjan Keesman, Robert Hellinghuizen, Fokke Hoeksema, Geert Heideman, xe2x80x9cTranscoding of MPEG bitstreamsxe2x80x9d, Signal Processing: Image Communication, Vol. 8, 1966, pp. 481-500).
FIG. 20 is a block diagram for explaining a transcoding system 100a according to a prior art.
The transcoding system 100a comprises a decoding unit D1 and an encoding unit E1. The decoding unit D1 receives an MPEG2 bit stream Eg1 obtained by subjecting image data to a coding process based on MPEG2, and subjects the bit stream Eg1 to a decoding process, thereby generating decoded data Rg1. The encoding unit E1 subjects the decoded data Rg1 to a coding process based on MPEG2 under a condition different from that of the above-mentioned coding process, thereby generating transcoded data Eg2. The MPEG2 bit stream is obtained by coding image data for every image space as a coding unit (block) which comprises a predetermined number of pixels. Therefore, the decoding unit D1 performs the decoding process for the bit stream, block by block, and the encoding unit E1 performs the coding process for the decoded data Rg1, block by block.
Next, the structure of the decoding unit D1 will be described in detail.
The decoding unit D1 includes a VLD (Variable Length Decoding) unit 100 for subjecting the coded MPEG2 bit stream Eg1 to VLD; an inverse quantization unit 101 for subjecting the output Vg from the VLD 100 to inverse quantization; and an IDCT (Inverse Discrete Cosine Transform) unit 102 for subjecting the output IQg from the inverse quantization unit 101 to IDCT by which frequency-domain data is transformed to space-domain data. Further, the decoding unit D1 includes an adder 103 for adding the output data ITg from the IDCT unit 102 and its prediction data Mg1; and a frame memory 104 for storing the output Rg1 from the adder 103 as the prediction data Mg1. The output Rg1 from the adder 103 is output as the decoded data.
Next, the structure of the encoding unit E1 will be described in detail.
The encoding unit E1 includes a subtracter 105 for calculating a difference Dg between the output data Rg1 from the decoding unit D1 and its prediction data Mg2; a DCT (Discrete Cosine Transform) unit 106 for subjecting the output Dg from the subtracter 105 to DCT by which space-domain data is transformed to frequency-domain data; and a quantization unit 107 for subjecting the output Tg from the DCT unit 106 to quantization based on a quantization control signal Cq. Further, the encoding unit E1 includes a VLC (Variable-Length Coding) unit 112 for subjecting the output Qg from the quantization unit 107 to VLC; and a rate control unit 113 for outputting the quantization control signal Cq to the quantization unit 107 on the basis of the output Eg2 from the VLC unit 112. The output Eg2 from the VLC unit 112 is output as the transcoded data.
The rate control unit 113 calculates the target number of bits when coding the DCT output Tg corresponding to a block to be coded (target block), and outputs the obtained target number of bits as the quantization control signal Cq to the quantization unit 107.
Further, the encoding unit E1 includes an inverse quantization unit 108 for subjecting the output Qg from the quantization unit 107 to inverse quantization; and an IDCT unit 109 for subjecting the output IQg2 from the inverse quantization unit 108 to IDCT. Furthermore, the encoding unit E1 includes an adder 110 for adding the output data ITg2 from the IDCT unit 109 and its prediction data Mg2; and a frame memory 111 for storing the output Rg2 from the adder 110. The output Mg2 from the frame memory 111 is output as the prediction data.
FIG. 21 is a block diagram illustrating the quantization unit 107 in more detail. The quantization unit 107 comprises a quantization step derivation unit 200 for deriving a quantization step Qs2 on receipt of the target number of bits Cq from the rate control unit 113; and a quantizer 201 for quantizing the output Tg from the DCT unit 106 on the basis of the quantization step Qs2.
Next, the operation of the transcoding system 100a will be described.
Initially, coded data Eg1, which has been obtained by coding an image signal, is input to the decoding unit D1.
In the VLD unit 100, the coded data Eg1 is transformed to quantized coefficients Vg by variable-length decoding, and the quantized coefficients Vg are output to the inverse quantization unit 101. In the inverse quantization unit 101, the quantized coefficients Vg are subjected to inverse quantization based on the quantization step used in the coding process for the image signal, whereby frequency components IQg are restored. The frequency components IQg are transformed to space-domain data ITg by IDCT (Inverse Discrete Cosine Transform) in the IDCT unit 102. When the space-domain data ITg is input to the adder 103, addition of the space-domain data ITg and the prediction data Mg1 is performed, resulting in reproduced data Rg1. The reproduced data Rg1 is output as decoded data from the decoding unit D1 and, on the other hand, it is stored in the frame memory 104 as already-decoded image data (prediction data) Mg1.
Next, the operation of the encoding unit E1 will be described.
Initially, the reproduced data Rg1 output from the decoding unit D1 is input to the subtracter 105. In the subtracter 105, a difference between the reproduced data Rg1 and its prediction data Mg2 is obtained as difference data Dg. The difference data Dg is output to the DCT unit 106. In the DCT unit 106, the difference data Dg is transformed to DCT coefficients (frequency components) Tg by DCT (Discrete Cosine Transform), and the DCT coefficients are output to the quantization unit 107.
In the quantization unit 107, the DCT coefficients Tg from the DCT unit 106 are quantized on the basis of the quantization control signal Cq from the rate control unit 113. To be specific, in the quantization step derivation unit 200 of the quantization unit 107, a quantization step different from the quantization step in the inverse quantization process in the decoding unit is derived on the basis of the quantization control signal Cq. In the quantizer 201, the DCT coefficients Tg are quantized on the basis of the derived quantization step.
The quantized values Qg obtained by this quantization are output to the VLC unit 112 and to the inverse quantization unit 108. In the VLC unit 112, the quantized values Qg are transformed to variable-length codes by variable-length coding, and the variable-length codes are output as transcoded data Eg2. In the rate control unit 113, the quantization control signal Cq is generated on the basis of the output Eg2 from the VLC unit 112 to be output to the quantization unit 107.
On the other hand, in the inverse quantization unit 108, the quantized values Qg from the quantization unit 107 are subjected to inverse quantization to generate DCT coefficients IQg2, and the DCT coefficients IQg2 are output to the IDCT unit 109. In the IDCT unit 109, the DCT coefficients IQg2 are transformed to space-domain data ITg2 by IDCT (Inverse Discrete Cosine Transform), and the data ITg2 is output to the adder 110. In the adder 110, addition of the output data ITg2 from the IDCT unit 109 and the prediction data Mg2 is performed, thereby generating reproduced data Rg2. The reproduced data Rg2 is stored in the frame memory 111 as the prediction data Mg2.
In the transcoding system 100a shown in FIG. 20, both of the input coded data (bit stream) and the coded data output from this system are based on the same coding method (MPEG2 coding). However, the transcoding system 100a may transform coded data based on the H261 standard, the H263 standard, the MPEG1 standard or the MPEG2 standard, into coded data based on the MPEG4 standard. Alternatively, the transcoding system 100a may transform coded data based on the MPEG4 standard into coded data based on the H263 standard.
In the above-described transcoding systems, however, it is difficult to reduce a quantization error included in the transcoded stream.
To be specific, since the coded data Eg1 supplied to the transcoding system 100a has been obtained by subjecting image data to a coding process including a quantization process, the coded data Eg1 contains a quantization error. Therefore, the transcoded data Eg2 which has been obtained by subjecting the coded data Eg1 to a decoding process and a transcoding process also contains the quantization error of the coded data Eg1. Even more problematic, depending on the condition of quantization in the transcoding process, the quantization error included in the transcoded data Eg2 becomes significantly larger than the quantization error included in the coded data Eg1.
Moreover, in the transcoding system 100a, it is difficult to set the quantization step in the transcoding process so as to minimize the coding error. Hereinafter, this problem will be described in more detail.
FIG. 22 is a diagram for explaining the relationship between the bit rate of a coded stream and a coding error, included in the coded stream. In FIG. 22, the relationship between them based on the rate-error theory is indicated by a graph C on a two-dimensional coordinate plane, wherein the abscissa corresponds to the bit rate and the ordinate corresponds to the coding error.
Generally, the relationship based on the rate-error theory is realized between the bit rate and the coding error, and the lower limit of the coding error is determined according to the bit rate. In other words, the coding error can be reduced to a smaller value when the bit rate is high, but the coding-error cannot be reduced so much when the bit rate is low.
Therefore, in the direct coding process, i.e., in the process of coding an image signal which has not been coded yet, an optimum quantization step is decided as follows.
Initially, a relational expression (exponential function) indicating the relationship between the bit rate and the coding error, corresponding to an image to be coded, is obtained on the basis of two pairs of bit rate and coding error which are obtained by subjecting an image signal to a coding process including a quantization process using two quantization steps. The lower limit of the coding error corresponding to the bit rate of the coded stream is obtained from this relational expression.
Next, based on this relational expression, a quantization step is determined for each frame so that the coding error of each frame is minimized, within a range where the total number of bits in each frame does not exceed the target number of bits per frame. That is, a quantization step is determined so that the actual coding error is closest to the lower limit of the coding error corresponding to the allowable maximum bit rate.
However, since this method of deriving an optimum quantization step is based on the relational expression (exponential function) indicating the relationship between the bit rate and the coding error, it cannot be used in the transcoding process which cannot derive this relational expression.
That is, in the stream obtained by the transcoding process, the coding error is the sum of the coding error included in the input stream and the coding error which occurs during the transcoding process. In this case, since the coding error included in the input stream is unknown, it is impossible to obtain a relational expression (exponential function) indicating the relationship between the bit rate and the coding error.
Further, in the quantization step derivation method, since a quantization step is determined frame by frame, the coding error cannot be efficiently reduced.
Moreover, in the quantization step derivation method, a quantization step is determined so as to minimize the coding error of the target frame to be coded, and this method is not adapted to inter-frame predictive coding based on MPEG. Hereinafter, this problem will be described briefly.
FIG. 23 is a schematic diagram for explaining inter-frame predictive coding based on MPEG. FIG. 24 illustrates typical image data of video to be subjected to MPEG coding, including an I frame F(1), P frames F(3) and F(5), and B frames F(2) and F(4).
As for the I frame F(1), image data of this frame is subjected to intra-frame coding without referring to image data of another frame. As for each of the P frames F(3) and F(5), image data of this frame is subjected to inter-frame predictive coding with reference to image data of an already-coded frame which is previous to this P frame in display order. As for each of the B frames F(2) and F(4), image data of this frame is subjected to inter-frame predictive coding with reference to image data of two already-coded frames which are previous and subsequent to this frame in display order. Further display times T1xcx9cT5 (T1 less than T2 less than T3 less than T4 less than T5) are set for these frames F(1)xcx9cF(5), respectively.
In this case, the coding process for the P frame F(3) is performed with reference to the image data corresponding to the I frame (1), and the image data-of this P frame F(3) is referred to when coding the P frame F(5) and the B frames F(2) and F(4). Accordingly, a coding error which occurs in the coding process for the P frame F(3) increases the predictive residuals in the inter-frame predictive coding for the frames F(2), F(4), and F(5).
In other words, in the inter-frame prediction coding, only setting a quantization step for the frame F(3) so as to minimize the coding error of the frame F(3) is not sufficient for effectively minimizing the coding errors in the frame F(2), F(4), and F(5) which are coded with reference to the image data of the frame F(3).
The present invention is made to solve the above-described problems and it is an object of the present invention to provide a coded data transform method and a transcoding system which can perform a transcoding process for coded image data while effectively minimizing the quantization error included in the coded data, and a data storage medium which contains a program for making a computer perform a process according to the coded data transformation method.
It is another object of the present invention to provide a transcoding method and a transcoding system which can minimize the coding error on the basis of the relationship between the bit rate and the coding error according to the rate-error theory, and a data storage medium which contains a program for making a computer perform a process according to this transcoding method.
It is still another object of the present invention to provide a transcoding method and a transcoding system which can perform a transcoding process for a reference frame which is referred to in an inter-frame predictive coding process so that the transcoding error of a frame to be subjected to the inter-frame predictive coding is effectively minimized, and a data storage medium which contains a program for making a computer perform a process according to this transcoding method.
Other objects and advantages of the present invention will become apparent from the detailed description that follows. The detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the scope of the invention will be apparent to those of skill in the art from the detailed description.
According to a first aspect of the present invention, there is provided a coded data transform method including a decoding process for decoding first coded data which has been obtained by subjecting image data to a coding process including a first orthogonal transform process and a first quantization process, for each coding unit, to generate decoded data; and a transcoding process for coding the decoded data, for each coding unit, to generate second coded data. The decoding process includes an inverse quantization process for inversely quantizing quantized coefficients obtained from the first coded data, by using a first quantization step which has been used in the first quantization process. The transcoding process includes a second orthogonal transform process for subjecting the decoded data to orthogonal transform to generate frequency-domain data; and a second quantization process for deriving a second quantization step on the basis of the second coded data and the first quantization step, and quantizing the frequency-domain data with the second quantization step. Therefore, a quantization step to be used in the second quantization process can be set according to the quantization step used in the first quantization process. That is, under the restriction on the target number of bits in the transcoding process based on the transcoded data, the quantization step of the second quantization process can be set so that the quantization error is minimized, considering the non-linear relationship between the bit rate in the transcoding process and the quantization distortion (quantization error). Thereby, an increase in the quantization error due to the transcoding process can be effectively suppressed under the restriction on the bit rate.
According to a second aspect of the present invention, in the coded data transform method of the first aspect, the second quantization process further includes a candidate derivation process for deriving a candidate quantization step on the basis of the second coded data; and a quantization step derivation process for deriving the second quantization step on the basis of the candidate quantization step and the first quantization step. Therefore, the number of bits generated in the transcoding process can be made smaller than the target number of bits while suppressing an increase in the quantization error, by a relatively simple process of selecting, as a quantization step to be used in the second quantization process, a larger one between the candidate quantization step and the quantization step used in the first quantization process.
According to a third aspect of the present invention, in the coded data transform method of the second aspect, in the quantization step derivation process, when the candidate quantization step has a value which is equal to or larger than the value of the first quantization step and smaller than twice the value of the first quantization step, a quantization step having the same value as that of the first quantization step or a quantization step having a value equal to or larger than twice the value of the first quantization step is derived as the second quantization step; and when the candidate quantization step has a value outside the above-described range, the candidate quantization step is derived as the second quantization step. Therefore, as the quantization step to be used in the second quantization process, a value outside a range from the value of the quantization step used in the first quantization process to twice the value of this quantization step can be set. Thereby, the number of bits generated in the transcoding process can be made smaller than the target number of bits, without increasing the number of bits of the coded data, and without significantly increasing the quantization error.
According to a fourth aspect of the present invention, in the coded data transform method of the first aspect, the coding process includes a first intra-frame coding process utilizing the correlation of pixel values in a frame, and a first inter-frame coding process utilizing the correlation of pixel values between frames, and the first intra-frame coding process includes a first intra-frame quantization process while the first inter-frame coding process includes a first inter-frame quantization process. The transcoding process includes a second intra-frame coding process utilizing the correlation of pixel values in a frame, and a second inter-frame coding process utilizing the correlation of pixel values between frames, and the second intra-frame coding process includes a second intra-frame quantization process while the second inter-frame coding process includes a second inter-frame quantization process. The decoding process includes an intra-frame decoding process adapted to the intra-frame coding process, and an inter-frame decoding process adapted to the inter-frame coding process, and the intra-frame decoding process includes an intra-frame inverse quantization process while the inter-frame decoding process includes an inter-frame inverse quantization process. The second quantization process includes an average quantization step derivation process for deriving the average of quantization steps of all coding units in the first intra-frame quantization process as a first intra-frame average quantization step, the average of quantization steps of all coding units in the second intra-frame quantization process as a second intra-frame average quantization step, the average of quantization steps of all coding units in the first inter-frame quantization process as a first inter-frame quantization step, and the average of quantization steps of all coding units in the second inter-frame quantization process as a second inter-frame quantization step; and a quantization step derivation process for deriving the second quantization step on the basis of these average quantization steps and the transcoded data. Therefore, in the transcoding process including the intra-frame coding process and the inter-frame coding process, the ratio of re-quantization to intra-frame coding, i.e., the ratio of the second quantization step to the first quantization step, can be made smaller than the ratio of re-quantization to inter-frame coding, whereby the sizes of quantization errors can be made uniform between the intra-frame coding process and the inter-frame coding process.
According to a fifth aspect of the present invention, in the data transform method of the fourth aspect, in the second quantization step derivation process, the second quantization step is derived so that the ratio of the second intra-frame average quantization step to the first intra-frame average quantization step is smaller than the ratio of the second inter-frame average quantization step to the first inter-frame average quantization step. Therefore, a quantization step to be used in the transcoding process can be derived so that the ratio of re-quantization to intra-frame coding (i.e., the ratio of the quantization step of the second coding process to the quantization step of the first coding process) becomes smaller than the ratio of re-quantization to inter-frame coding. Thereby, the sizes of quantization errors due to the respective coding processes can be made uniform between the intra-frame coding process and the inter-frame coding process in the transcoding process.
According to a sixth aspect of the present invention, there is provided a transcoding system comprising a decoding unit for receiving coded data which has been obtained by subjecting image data of each coding unit to a coding process including a first orthogonal transform process and a first quantization process, and decoding the input coded data for each coding unit to generate decoded data; and an encoding unit for coding the decoded data to generate transcoded data. The decoding unit includes an inverse quantizer for inversely quantizing quantized coefficients obtained from the input coded data, with a first quantization step which has been used in the first quantization process. The encoding unit includes a frequency transform unit for subjecting the decoded data to a second orthogonal transform process to generate frequency-domain data; and quantization means for subjecting the frequency-domain data to a second quantization process with a second quantization step which is derived on the basis of the transcoded data and the first quantization step. Therefore, a quantization step to be used in the second quantization process can be set so that the quantization error is minimized, on the basis of the non-linear relationship between the bit rate in the transcoding process and the quantization distortion (quantization error), while suppressing the number of bits in the transcoding process under the target number of bits. Thereby, an increase in the quantization error due to the transcoding process can be effectively suppressed under the restriction on the bit rate.
According to a seventh aspect of the present invention, in the transcoding system of the sixth aspect, the inverse quantizer performs inverse quantization corresponding to either intra-frame quantization or inter-frame quantization, according to that the coding process performed on the input coded data is either intra-frame coding or inter-frame coding. The quantization means comprises a first step derivation unit for averaging the quantization steps of all coding units in the inverse quantization process corresponding to the intra-frame quantization process, on the basis of the first quantization step supplied from the inverse quantizer, thereby deriving an intra-frame average quantization step; a second step derivation unit for averaging the quantization steps of all coding units in the inverse quantization process corresponding to the inter-frame quantization, on the basis of the first quantization step supplied from the inverse quantizer, thereby deriving an inter-frame average quantization step; and a quantization step derivation unit for deriving a second quantization step on the basis of the transcoded data, the intra-frame average quantization step, and the inter-frame average quantization step. The quantization means quantizes the frequency-domain data with the second quantization step. Therefore, in the transcoding process including the intra-frame coding process and the inter-frame coding process, the ratio of re-quantization to intra-frame coding, i.e., the ratio of the second quantization step to the first quantization step, can be made smaller than the ratio of re-quantization to inter-frame coding, whereby the sizes of quantization errors can be made uniform between the intra-frame coding process and the inter-frame coding process.
According to an eighth aspect of the present invention, there is provided a data storage medium containing a data transform program for making a computer perform the coded data transform method of the first aspect. Therefore, the transcoding process can be performed with effectively suppressing an increase in the quantization error.
According to a ninth aspect of the present invention, there is provided a transcoding method for transforming an input stream obtained by coding an image signal, into a transcoded stream having a bit rate lower than a specified bit rate, in a transcoding process. This method comprises a decoding process for decoding the input stream to generate a decoded stream; a plurality of simulation coding processes having different quantization steps, for successively quantizing and coding the decoded stream for every coding unit; a quantization step derivation process for deriving an optimum quantization step so that a difference between the bit rate of the transcoded stream and the specified bit rate is minimized, on the basis of the numbers of bits per coding unit which are obtained in the respective simulation coding processes, the increments of coding error due to the respective simulation coding processes, and the specified bit rate; and a main coding process for quantizing and coding the decoded stream with the optimum quantization step, and outputting a transcoded stream corresponding to the input stream Therefore, even in the transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized. Further, the bit rate of the transcoded stream can be suppressed under a predetermined value. As the result, a transcoded stream having high transmission efficiency can be obtained without degrading the image quality.
According to a tenth aspect of the present invention, the transcoding method of the ninth aspect includes, as the plural simulation coding processes, a first simulation coding process for coding the decoded stream with a first quantization step, and a second simulation coding process for coding the decoded stream with a second quantization step which is larger than the first quantization step. Therefore, an optimum quantization step for the transcoding process can be derived by the relatively simple structure.
According to an eleventh aspect of the present invention, in the transcoding method of the tenth aspect, in the quantization step derivation process, a transcoding error increasing rate which is the ratio of a variation in increment of coding error to a variation in the number of bits per coding unit in the transcoding process, is calculated on the basis of the number of bits per coding unit which is obtained in the first simulation coding process, the increment of coding error due to the first simulation coding process, the number of bits per coding unit which is obtained in the second simulation coding process, and the increment of coding error due to the second simulation coding process; and either the first quantization step or the second quantization step is derived as an optimum quantization step, for each coding unit, according to the transcoding error increasing rate. Therefore, even in the transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized according to the rate-error theory.
According to a twelfth aspect of the present invention, there is provided a transcoding method for subjecting an input stream obtained by coding an image signal to a transcoding process for each coding unit, thereby transforming the input stream into a transcoded stream having a bit rate lower than a specified bit rate. This method comprises a calculation process for calculating a target transcoding error increasing rate corresponding to one frame, on the basis of data obtained as the result of the transcoding process, the target transcoding error increasing rate being the ratio of an increment of coding error per coding unit which is generated in the transcoding process to the number of bits per coding unit which is reduced by the transcoding process; a decoding process for decoding the input stream to generate a decoded stream; a plurality of simulation coding processes having different quantization steps, for successively quantizing and coding the decoded stream for every coding unit; a quantization step optimization process for deriving an optimum quantization step for each coding unit, on the basis of the numbers of bits per coding unit which are obtained in the respective simulation coding processes, the increments of coding error due to the respective simulation coding processes, and the target transcoding error increasing rate; and a main coding process for quantizing and coding the decoded stream with the optimum quantization step, and outputting a transcoded stream corresponding to the input stream. Therefore, even in a transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized and, furthermore, the quality of image obtained from the transcoded stream is prevented from being degraded. As a result, the coded stream can be transformed to a stream of high transmission efficiency, without degrading the image quality.
According to a thirteenth aspect of the present invention, the transcoding method of the twelfth aspect includes, as the plural simulation coding processes, a first simulation coding process for quantizing and coding the decoded stream with a first quantization step; a second simulation coding process for quantizing and coding the decoded stream with a second quantization step which is larger than the first quantization step; and a third simulation coding process for quantizing and coding the decoded stream with a third quantization step which is larger than the second quantization step. Therefore, an optimum quantization step for the transcoding process can be derived by the relatively simple structure.
According to a fourteenth aspect of the present invention, in the transcoding method of the thirteenth aspect, the quantization step derivation process includes a function derivation process for deriving, for each coding unit, a function which indicates the relationship between the quantization step corresponding to each coding unit and the transcoding error increasing rate which is the ratio of a variation in increment of coding error to a variation in the number of bits per coding unit in the transcoding process, on the basis of the first, second, and third numbers of bits per coding unit which are generated in the first, second, and third simulation coding processes, first, second, and third increments of coding error due to the first, second, and third simulation coding processes, and first, second, and third quantization steps used in the first, second, and third simulation coding processes; and a quantization step decision process for deciding a quantization step in which the transcoding error increasing rate corresponding to each coding unit matches the target transcoding error increasing rate corresponding to the one frame, as an optimum quantization step for each coding unit, on the basis of the function. Therefore, an optimum quantization step can be derived with high precision.
According to a fifteenth aspect of the present invention, in the transcoding method of the fourteenth aspect, in the quantization step derivation process, only when the transcoding error increasing rate corresponding to each coding frame is smaller than the target transcoding error increasing rate corresponding to one frame, the quantization step used in the first simulation coding process is derived as an optimum quantization step, instead of the optimum quantization step decided in the quantization step decision process. Therefore, even when it is difficult to derive an optimum quantization step on the basis of the function, the operation to derive the quantization step is performed with stability.
According to a sixteenth aspect of the present invention, in the transcoding method of the fifteenth aspect, in the quantization step derivation process, when the transcoding error increasing rate corresponding to each coding unit is not smaller than the target transcoding error increasing rate corresponding to one frame, a value larger than the second quantization step is derived as the value of the optimum quantization step to be obtained in the quantization step decision process. Therefore, when an optimum quantization step can be derived on the basis of the function, it is derived with high precision.
According to a seventeenth aspect of the present invention, there is provided a transcoding system for transforming an input stream obtained by coding an image signal, into a transcoded stream having a bit rate lower than a specific bit rate, in a transcoding process. This system comprises a calculator for calculating the target number of bits for a target frame to be transcoded, on the basis of data obtained as the result of the transcoding process and a specified bit rate supplied from the outside of the system; a decoder for decoding the input stream to generate a decoded stream; a plurality of simulation encoders having different quantization steps, each encoder performing simulation coding for successively quantizing and coding the decoded stream for every coding unit; a quantization step derivation unit for deriving an optimum quantization step so that a difference between the bit rate of the transcoded stream and the specified bit rate is minimized, on the basis of the numbers of bits per coding unit which are obtained in the processes of the respective simulation encoders, the increments of coding error due to the processes of the respective simulation encoders, and the target number of bits for the target frame; and a main encoder for quantizing and coding the decoded stream with the optimum quantization step, and outputting a transcoded stream corresponding to the input stream. Therefore, even in the transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized and, moreover, the bit rate of the transcoded stream can be suppressed under a predetermined value. As a result, a transcoded stream having high transmission efficiency is obtained without degrading the image quality.
According to an eighteenth aspect of the present invention, the transcoding system of the seventeenth aspect includes, as the plural simulation encoders, a first simulation encoder for subjecting the decoded stream to a first simulation coding process including a quantization process using a first quantization step, and outputting the number of bits per coding unit obtained by the simulation coding process, an increment of coding error due to the simulation coding process, and the first quantization step; and a second simulation encoder for subjecting the decoded stream to a second simulation coding process including a quantization process using a second quantization step which is larger than the first quantization step, and outputting the number of bits per coding unit obtained in the simulation coding process, an increment of coding error due to the simulation coding process, and the second quantization step; and a switch for selecting either the first quantization step or the second quantization step. In this transcoding system, the quantization step derivation unit calculates a transcoding error increasing rate which is the ratio of a variation in increment of coding error to a variation in the number of bits per coding unit in the transcoding process, on the basis of the numbers of bits per coding unit which are obtained in the first and second simulation coding processes and the increments of coding error due to the first and second simulation coding processes, and the quantization step derivation unit controls the switch so that it selects either the first quantization step or the second quantization step, according to the transcoding error increasing rate corresponding to each coding unit. Therefore, even in the transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized on the basis of the rate-error theory.
According to a nineteenth aspect of the present invention, there is provided a transcoding system for subjecting an input stream obtained by coding an image signal to a transcoding process for each coding unit, thereby transforming the input stream into a transcoded stream having a bit rate lower than a specific bit rate. This system comprises a calculator for calculating a target transcoding error increasing rate corresponding to one frame, on the basis of data obtained as the result of the transcoding process, the target transcoding error increasing rate being the ratio of an increment of coding error per coding unit which is generated in the transcoding process to the number of bits per coding unit which is reduced by the transcoding process; a decoder for decoding the input stream to generate a decoded stream; a plurality of simulation encoders having different quantization steps, each encoder performing simulation coding for successively quantizing and coding the decoded stream for each coding unit; a quantization step derivation unit for deriving an optimum quantization step for each coding unit, on the basis of the numbers of bits per coding unit which are obtained in the processes of the respective simulation encoders, the increments of coding error due to the processes of the respective simulation encoders, and the target number of bits for the target frame; and a main encoder for quantizing and coding the decoded stream with the optimum quantization step, and outputting a transcoded stream corresponding to the input stream. Therefore, even in the transcoding process where a coding error included in the input stream is unknown, the coding error can be minimized and, furthermore, the quality of image obtained from the transcoded stream is prevented from being degraded. As the result, the coded stream can be transformed to a stream of high transmission efficiency, without degrading the image quality.
According to a twentieth aspect of the present invention, the transcoding system if the nineteenth aspect includes, as the plural simulation encoders, a first simulation encoder for subjecting the decoded stream to a first simulation coding process including a quantization process using a first quantization step, and outputting the number of bits per coding unit obtained in the simulation coding process, an increment of coding error due to the simulation coding process, and a first quantization step; a second simulation encoder for subjecting the decoded stream to a second simulation coding process including a quantization process using a second quantization step which is larger than the first quantization step, and outputting the number of bits per coding unit obtained in the simulation coding process, an increment of coding error due to the simulation coding process, and the second quantization step; and a third simulation encoder for subjecting the decoded stream to a third simulation coding process including a quantization process using a third quantization step which is larger than the second quantization step, and outputting the number of bits per coding unit obtained in the simulation coding process, an increment of coding error due to the simulation coding process, and the third quantization step. Therefore, an optimum quantization step for the transcoding process can be derived by the relatively simple structure.
According to a twenty-first aspect of the present invention, in the transcoding system of the twentieth aspect, the quantization step derivation unit comprises a calculation unit for calculating a transcoding error increasing rate which is the ratio of a variation in increment of coding error to a variation in the number of bits per coding unit in the transcoding process, on the basis of the numbers of bits per coding unit which are obtained in the processes of the respective simulation encoders, and the increments of coding error due to the processes of the respective simulation encoders; and a quantization step selector for selecting one of the first, second, and third quantization steps, according to the result of comparison between the transcoding error increasing rate corresponding to each coding unit and the target transcoding error increasing rate. Therefore, an optimum quantization step for the transcoding process can be derived with high precision, by the relatively simple structure.
According to a twenty-second aspect of the present invention, in the transcoding system of the twentieth aspect, the quantization step derivation unit includes a function derivation unit for deriving, for each coding unit, a function which indicates the relationship between the quantization step corresponding to each coding unit and the transcoding error increasing rate which is the ratio of a variation in increment of coding error to a variation in the number of bits per coding unit in the transcoding process, on the basis of the first, second, and third numbers of bits per coding unit which are generated by the first, second, and third simulation coding processes, first, second, and third increments of coding error due to the first, second, and third simulation coding processes, and the first, second, and third quantization steps used in the first, second, and third simulation coding processes; and a quantization step calculator for calculating a quantization step in which the transcoding error increasing rate corresponding to each coding unit matches the target transcoding error increasing rate corresponding to one frame, as an optimum quantization step for each coding unit, on the basis of the function. Therefore, an optimum quantization step for the transcoding process can be derived with high precision, by the relatively simple structure.
According to a twenty-third aspect of the present invention, in the transcending system of the twenty-second aspect, the quantization step derivation unit includes a comparator for comparing the transcoding error increasing rate corresponding to each coding unit, with the target transcoding error increasing rate; and a quantization step selector for selecting either the quantization step calculated by the quantization step calculator or the first quantization step, according to the result of comparison, and outputting the selected quantization step as an optimum quantization step. Therefore, even when it is difficult to derive an optimum quantization step on the basis of the function, the operation to derive the quantization step can be performed with stability. On the other hand, when an optimum quantization step can be derived on the basis of the function, it is derived with high precision.
According to a twenty-fourth aspect of the present invention, there is provided a data storage medium containing a program for making a computer perform the transcoding method of the ninth aspect. Therefore, the process of transforming the coded stream to a stream of high transmission efficiency without degrading the image quality can be realized by software.
According to a twenty-fifth aspect of the present invention, there is provided a data storage medium containing a program for making a computer perform the transcoding method of the twelfth aspect. Therefore, the process of transforming the coded stream to a stream of high transmission efficiency without degrading the image quality can be realized by software.